const express = require('express')
const app = express();


//设置模板引擎为ejs
app.set('view engine','ejs');

app.use(express.static('static'));

app.get('/', (req, res) => res.render('index'));
app.get('/login', (req, res) => res.render('login'));
app.get('/signin', (req, res) => res.render('signin'));
app.get('/forget', (req, res) => res.render('forget'));
app.get('/message', (req, res) => res.render('message'));
app.get('/company', (req, res) => res.render('company'));
app.get('/capital', (req, res) => res.render('capital'));
app.get('/capitaldetail', (req, res) => res.render('capitaldetail'));
app.get('/capitallist', (req, res) => res.render('capitallist'));
app.get('/changepassword', (req, res) => res.render('changepassword'));


app.get('/admin/', (req, res) => res.render('admin/index.ejs'));
app.get('/admin/login', (req, res) => res.render('admin/adminlogin.ejs'));
app.get('/admin/enterpriseregiest', (req, res) => res.render('admin/enterprise-regiest.ejs'));
app.get('/admin/enterprisedeclare', (req, res) => res.render('admin/enterprise-declare.ejs'));
app.get('/admin/enterprisedeclaredetail', (req, res) => res.render('admin/enterprisedeclaredetail.ejs'));
app.get('/admin/enterpriseregistdetail', (req, res) => res.render('admin/enterpriseregistdetail.ejs'));
app.get('/admin/loan', (req, res) => res.render('admin/loan.ejs'));
app.get('/admin/projectdetail', (req, res) => res.render('admin/projectdetail.ejs'));
app.get('/admin/user', (req, res) => res.render('admin/user.ejs'));
app.get('/admin/addadmin', (req, res) => res.render('admin/addadmin.ejs'));
app.get('/admin/config', (req, res) => res.render('admin/config.ejs'));
app.get('/admin/changepassword', (req, res) => res.render('admin/config.ejs'));
app.get('/admin/userinfo', (req, res) => res.render('admin/userinfo.ejs'));

app.listen(3000, () => console.log('Example app listening on port 3000!'))
